<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common.jsp" %>
<div class="pageContent">
	<form id="editFrom1" method="post" action="${ctxPath }/sys/sysResource/edit" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
		<div class="pageFormContent" layoutH="150">
			<input type="hidden" name="navTabId" value="editResourceByModules">
			<input type="hidden" name="forwardUrl" value="">

			<input type="hidden" id="menuId" name="id" value="${resource.id }" />
			<input type="hidden" name="level" value="${resource.level }" />
			<input type="hidden" name="isLeaf" value="${resource.isLeaf }" />

			<p style="width: 99%">
				<label>上级菜单：</label>${pName} 【<c:choose><c:when test="${flag eq 'moduleId' }">模块</c:when><c:otherwise>菜单</c:otherwise></c:choose>】
			</p>
			<p style="width: 99%">
				<label>菜单名称：</label>
				<input type="text" name="name" class="required" maxlength="90" value="${resource.name }" size="30" />
			</p>
			<p style="width: 99%">
				<label>菜单编号：</label>
				<input type="text" name="seq" class="required number" maxlength="20" value="${resource.seq }" size="30" />
			</p>
			<p style="width: 99%">
				<label>请求URL：</label>
				<input type="text" name="url" maxlength="150" value="${resource.url }" size="50" />
			</p>

			<p style="width: 99%">
				<label>navTabId：</label>
				<input type="text" name="targetName" maxlength="50" value="${resource.targetName}" size="30" />
			</p>
			
			<p style="width: 99%">
				<label>资源类别:</label>
				<label><input type="radio" name="type" value="0" <c:if test="${resource.type==0}">checked</c:if>/>菜单</label>
				<label><input type="radio" name="type" value="1" <c:if test="${resource.type==1}">checked</c:if>/>按钮</label>
			</p>
			<p style="width: 99%">
				<label>状态:</label>
				<label><input type="radio" name="status" value="0" <c:if test="${resource.status==0}">checked</c:if>/>启用</label>
				<label><input type="radio" name="status" value="1" <c:if test="${resource.status==1}">checked</c:if>/>停用</label>
			</p>
			
			<div class="buttonActive" style="margin-left: 130px; margin-top: 30px;">
				<div class="buttonContent">
					<button type="submit">保存</button>
				</div>
			</div>
		</div>
	</form>
</div>
<script type="text/javascript">
	function submitForm2() {
		$("#editFrom1").submit();
	}
</script>